package com.example.myrule;

//ribbon自定义的负载均衡算法不能放在@ComponentScan包及其子包下，否则被所有客户端共享

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyselfRule {
    @Bean
    public IRule myrule() {
        return new RandomRule();
    }
}
